package com.gdwhomework.chapter07.homework006;

public class Student extends Person{
    private int stu_id;

    public Student(String name, char gender, int age, int stu_id) {
        super(name, gender, age);
        this.stu_id = stu_id;
    }

    public int getStu_id() {
        return stu_id;
    }

    public void setStu_id(int stu_id) {
        this.stu_id = stu_id;
    }

    @Override
    public String play() {
        return super.play()+"足球";
    }
    public void study(){
        System.out.println("我承诺，我会好好学习。");
    }

    @Override
    public void showinfo() {
        System.out.println("学生的信息：");
        super.showinfo();
        System.out.println("学号："+getStu_id());

    }
}
